package com.qnnu.studenttravelsystem.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.qnnu.studenttravelsystem.entity.ClassInfo;
import com.qnnu.studenttravelsystem.mapper.ClassInfoMapper;
import com.qnnu.studenttravelsystem.service.IClassInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zhongge
 * @since 2025-11-20
 */
@Service
public class ClassInfoServiceImpl extends ServiceImpl<ClassInfoMapper, ClassInfo> implements IClassInfoService {

    @Autowired
    private ClassInfoMapper classInfoMapper;
    @Override
    public List<ClassInfo> findByCounselorId(Long counselorId) {
        QueryWrapper<ClassInfo> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("counselor_id",counselorId);
        return classInfoMapper.selectList(queryWrapper);
    }
}
